<?php

$this->setLayout('template' . DS . 'default.phtml');
$this->startBlock('scriptBlocks');
?>
<script language="javascript" type="text/javascript">
    $().ready(function(){
        var value = $('#type').val();
        $('#field_'+value).show();
        $('#type').change(function(){
//            if($(this).val() == 'picture'){
            $('#filebrowser_container_picture').hide();
            $('#filebrowser_container_flash').hide();
//            }
            $('#field_introduction').add('#field_flash').add('#field_picture').add('#field_animation').css('display','none');
            var v = $(this).val();
            $('#field_'+v).show();
            $('#filebrowser_container_' + $(this).val()).show();
        });
    });
</script>
<?php

$this->endBlock();

$this->startBlock();
echo $this->toolbar->toHtml();
echo $this->form->toHtml();
$this->endBlock();